package de.geckocraft.AchievementCraft.main;


import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import de.geckocraft.AchievementCraft.mysql.*;
import de.geckocraft.AchievementCraft.commands.*;

public class main extends JavaPlugin
{
	public static Plugin plugin;
	
	public void onEnable()
	{
		plugin = this.getServer().getPluginManager().getPlugin(this.getName());
		configset.loadConfig();
		mysqlconfig.loadConfig();
		broker.connect();
		commands();
	}

	public void onDisable()
	{
		
	}

	private void commands()
	{
		System.out.println("test");
		System.out.println(this);
		getCommand("ach").setExecutor(new CommandsMain(this));
	}
	
	public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args)
	{
		return false;
	}
	
	public static Plugin getPlugin()
	{
		Plugin p = plugin;
		return p;
	}
	
}
